<?php
if ( function_exists('register_sidebar') )
    register_sidebar();

function widget_mytheme_search() {
?>
    <li><h2>Site Search</h2><form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
<div><input type="text" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" />
<input type="submit" id="searchsubmit" value="Go" />
</div>
</form></li>
<?php
}
if ( function_exists('register_sidebar_widget') )
    register_sidebar_widget(__('Search'), 'widget_mytheme_search');

?>